package cn.itcast.demo08;

public class Demo02Log {
    public static void showLog(int level,MessageBuilder mb){
        if (level==1){
            System.out.println(mb.builder());
        }
    }

    public static void main(String[] args) {
        String msg1 = "hello";
        String msg2 = "world";
        String msg3 = "JAVA";

        showLog(2,()->{
            return msg1+msg2+msg3;
        });
    }
}
